Optimal. Leaf size=74 \[ -\frac{c+d x}{2 f (a \coth (e+f x)+a)}+\frac{(c+d x)^2}{4 a d}-\frac{d}{4 f^2 (a \coth (e+f x)+a)}+\frac{d x}{4 a f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.051007, antiderivative size = 74, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.167, Rules used = {3723, 3479, 8} \[ -\frac{c+d x}{2 f (a \coth (e+f x)+a)}+\frac{(c+d x)^2}{4 a d}-\frac{d}{4 f^2 (a \coth (e+f x)+a)}+\frac{d x}{4 a f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3723
Rule 3479
Rule 8
Rubi steps
\begin{align*} \int \frac{c+d x}{a+a \coth (e+f x)} \, dx &=\frac{(c+d x)^2}{4 a d}-\frac{c+d x}{2 f (a+a \coth (e+f x))}+\frac{d \int \frac{1}{a+a \coth (e+f x)} \, dx}{2 f}\\ &=\frac{(c+d x)^2}{4 a d}-\frac{d}{4 f^2 (a+a \coth (e+f x))}-\frac{c+d x}{2 f (a+a \coth (e+f x))}+\frac{d \int 1 \, dx}{4 a f}\\ &=\frac{d x}{4 a f}+\frac{(c+d x)^2}{4 a d}-\frac{d}{4 f^2 (a+a \coth (e+f x))}-\frac{c+d x}{2 f (a+a \coth (e+f x))}\\ \end{align*}
Mathematica [A] time = 0.262145, size = 81, normalized size = 1.09 \[ \frac{\left (2 c f (2 f x+1)+d \left (2 f^2 x^2+2 f x+1\right )\right ) \coth (e+f x)+2 c f (2 f x-1)+d \left (2 f^2 x^2-2 f x-1\right )}{8 a f^2 (\coth (e+f x)+1)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.058, size = 175, normalized size = 2.4 \begin{align*}{\frac{1}{af} \left ( -{\frac{d}{f} \left ({\frac{ \left ( fx+e \right ) \cosh \left ( fx+e \right ) \sinh \left ( fx+e \right ) }{2}}-{\frac{ \left ( fx+e \right ) ^{2}}{4}}-{\frac{ \left ( \cosh \left ( fx+e \right ) \right ) ^{2}}{4}} \right ) }+{\frac{d}{f} \left ({\frac{ \left ( fx+e \right ) \left ( \cosh \left ( fx+e \right ) \right ) ^{2}}{2}}-{\frac{\cosh \left ( fx+e \right ) \sinh \left ( fx+e \right ) }{4}}-{\frac{fx}{4}}-{\frac{e}{4}} \right ) }+{\frac{de}{f} \left ({\frac{\cosh \left ( fx+e \right ) \sinh \left ( fx+e \right ) }{2}}-{\frac{fx}{2}}-{\frac{e}{2}} \right ) }-{\frac{de \left ( \cosh \left ( fx+e \right ) \right ) ^{2}}{2\,f}}-c \left ({\frac{\cosh \left ( fx+e \right ) \sinh \left ( fx+e \right ) }{2}}-{\frac{fx}{2}}-{\frac{e}{2}} \right ) +{\frac{c \left ( \cosh \left ( fx+e \right ) \right ) ^{2}}{2}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.16564, size = 97, normalized size = 1.31 \begin{align*} \frac{1}{4} \, c{\left (\frac{2 \,{\left (f x + e\right )}}{a f} + \frac{e^{\left (-2 \, f x - 2 \, e\right )}}{a f}\right )} + \frac{{\left (2 \, f^{2} x^{2} e^{\left (2 \, e\right )} +{\left (2 \, f x + 1\right )} e^{\left (-2 \, f x\right )}\right )} d e^{\left (-2 \, e\right )}}{8 \, a f^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.11715, size = 239, normalized size = 3.23 \begin{align*} \frac{{\left (2 \, d f^{2} x^{2} + 2 \, c f + 2 \,{\left (2 \, c f^{2} + d f\right )} x + d\right )} \cosh \left (f x + e\right ) +{\left (2 \, d f^{2} x^{2} - 2 \, c f + 2 \,{\left (2 \, c f^{2} - d f\right )} x - d\right )} \sinh \left (f x + e\right )}{8 \,{\left (a f^{2} \cosh \left (f x + e\right ) + a f^{2} \sinh \left (f x + e\right )\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 1.45016, size = 250, normalized size = 3.38 \begin{align*} \begin{cases} \frac{2 c f^{2} x \tanh{\left (e + f x \right )}}{4 a f^{2} \tanh{\left (e + f x \right )} + 4 a f^{2}} + \frac{2 c f^{2} x}{4 a f^{2} \tanh{\left (e + f x \right )} + 4 a f^{2}} + \frac{2 c f}{4 a f^{2} \tanh{\left (e + f x \right )} + 4 a f^{2}} + \frac{d f^{2} x^{2} \tanh{\left (e + f x \right )}}{4 a f^{2} \tanh{\left (e + f x \right )} + 4 a f^{2}} + \frac{d f^{2} x^{2}}{4 a f^{2} \tanh{\left (e + f x \right )} + 4 a f^{2}} - \frac{d f x \tanh{\left (e + f x \right )}}{4 a f^{2} \tanh{\left (e + f x \right )} + 4 a f^{2}} + \frac{d f x}{4 a f^{2} \tanh{\left (e + f x \right )} + 4 a f^{2}} + \frac{d}{4 a f^{2} \tanh{\left (e + f x \right )} + 4 a f^{2}} & \text{for}\: f \neq 0 \\\frac{c x + \frac{d x^{2}}{2}}{a \coth{\left (e \right )} + a} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.18953, size = 88, normalized size = 1.19 \begin{align*} \frac{{\left (2 \, d f^{2} x^{2} e^{\left (2 \, f x + 2 \, e\right )} + 4 \, c f^{2} x e^{\left (2 \, f x + 2 \, e\right )} + 2 \, d f x + 2 \, c f + d\right )} e^{\left (-2 \, f x - 2 \, e\right )}}{8 \, a f^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]